﻿export default [
  {
    path: '/user',
    layout: false,
    routes: [
      {
        path: '/user/login',
        layout: false,
        name: 'login',
        component: './user/Login',
      },
      {
        path: '/user',
        redirect: '/user/login',
      },
      {
        name: 'register-result',
        icon: 'smile',
        path: '/user/register-result',
        component: './user/register-result',
      },
      {
        name: 'register',
        icon: 'smile',
        path: '/user/register',
        component: './user/register',
      },
      {
        component: '404',
      },
    ],
  },
  {
    path: '/home',
    name: 'home',
    icon: 'home',
    component: './home',
  },
  {
    path: '/system',
    name: 'system',
    icon: 'setting',
    routes: [
      {
        path: '/system/user',
        name: 'user',
        icon: 'smile',
        component: './system/user',
        access: 'system:user:list',
      },
      {
        path: '/system/role',
        name: 'role',
        icon: 'smile',
        component: './system/role',
        access: 'system:role:list',
      },
      {
        path: '/system/menu',
        name: 'menu',
        icon: 'smile',
        component: './system/menu',
        access: 'system:menu:list',
      },
      {
        path: '/system/dept',
        name: 'dept',
        icon: 'smile',
        component: './system/dept',
        access: 'system:dept:list',
      },
      {
        path: '/system/post',
        name: 'post',
        icon: 'smile',
        component: './system/post',
        access: 'system:post:list',
      },
      {
        path: '/system/dict',
        name: 'dict',
        icon: 'smile',
        component: './system/dict',
        access: 'system:dict:list',
      },
      {
        path: '/system/config',
        name: 'config',
        icon: 'smile',
        component: './system/config',
        access: 'system:config:list',
      },
      {
        path: '/system/notice',
        name: 'notice',
        icon: 'smile',
        component: './system/notice',
        access: 'system:notice:list',
      },
      {
        path: '/system/log',
        name: 'log',
        icon: 'smile',
        routes: [
          {
            path: '/system/log/operlog',
            name: 'operlog',
            icon: 'smile',
            component: './monitor/operlog',
            access: 'monitor:operlog:list',
          },
          {
            path: '/system/log/logininfor',
            name: 'logininfor',
            icon: 'smile',
            component: './monitor/logininfor',
            access: 'monitor:logininfor:list',
          },
        ],
      },
    ],
  },
  {
    path: '/monitor',
    name: 'monitor',
    icon: 'monitor',
    routes: [
      {
        path: '/monitor/online',
        name: 'online',
        icon: 'smile',
        component: './monitor/online',
        access: 'monitor:online:list',
      },
      {
        path: '/monitor/job',
        name: 'job',
        icon: 'smile',
        component: './monitor/job',
        access: 'monitor:job:list',
      },
      {
        path: '/monitor/druid',
        name: 'druid',
        icon: 'smile',
        component: './monitor/druid',
        access: 'monitor:druid:list',
      },
      {
        path: '/monitor/server',
        name: 'server',
        icon: 'smile',
        component: './monitor/server',
        access: 'monitor:server:list',
      },
      {
        path: '/monitor/cache',
        name: 'cache',
        icon: 'smile',
        component: './monitor/cache',
        access: 'monitor:cache:list',
      },
      {
        path: '/monitor/cacheList',
        name: 'cacheList',
        icon: 'smile',
        component: './monitor/cache/cacheList',
        access: 'monitor:cache:list',
      },
    ]
  },
  {
    path: '/tool',
    name: 'tool',
    icon: 'tool',
    routes: [
      {
        path: '/tool/swagger',
        name: 'swagger',
        icon: 'smile',
        component: './tool/swagger',
        access: 'tool:swagger:list',
      },
    ]
  },
  {
    name: 'account',
    icon: 'user',
    path: '/account',
    routes: [
      {
        path: '/account',
        redirect: '/account/center',
      },
      {
        name: 'center',
        icon: 'smile',
        path: '/account/center',
        component: './system/user/center',
      },
      {
        name: 'settings',
        icon: 'smile',
        path: '/account/settings',
        component: './system/user/settings',
      },
    ],
  },
  {
    path: '/dashboard',
    name: 'dashboard',
    icon: 'dashboard',
    routes: [
      {
        path: '/dashboard',
        redirect: '/dashboard/analysis',
        access: 'isAdmin',
      },
      {
        name: 'analysis',
        icon: 'smile',
        path: '/dashboard/analysis',
        component: './dashboard/analysis',
        access: 'isAdmin',
      },
      {
        name: 'monitor',
        icon: 'smile',
        path: '/dashboard/monitor',
        component: './dashboard/monitor',
        access: 'isAdmin',
      },
      {
        name: 'workplace',
        icon: 'smile',
        path: '/dashboard/workplace',
        component: './dashboard/workplace',
        access: 'isAdmin',
      },
    ],
  },
  {
    path: '/form',
    icon: 'form',
    name: 'form',
    routes: [
      {
        path: '/form',
        redirect: '/form/basic-form',
        access: 'isAdmin',
      },
      {
        name: 'basic-form',
        icon: 'smile',
        path: '/form/basic-form',
        component: './form/basic-form',
        access: 'isAdmin',
      },
      {
        name: 'step-form',
        icon: 'smile',
        path: '/form/step-form',
        component: './form/step-form',
        access: 'isAdmin',
      },
      {
        name: 'advanced-form',
        icon: 'smile',
        path: '/form/advanced-form',
        component: './form/advanced-form',
        access: 'isAdmin',
      },
    ],
  },
  {
    path: '/list',
    icon: 'table',
    name: 'list',
    routes: [
      {
        path: '/list/search',
        name: 'search-list',
        component: './list/search',
        routes: [
          {
            path: '/list/search',
            redirect: '/list/search/articles',
            access: 'isAdmin',
          },
          {
            name: 'articles',
            icon: 'smile',
            path: '/list/search/articles',
            component: './list/search/articles',
            access: 'isAdmin',
          },
          {
            name: 'projects',
            icon: 'smile',
            path: '/list/search/projects',
            component: './list/search/projects',
            access: 'isAdmin',
          },
          {
            name: 'applications',
            icon: 'smile',
            path: '/list/search/applications',
            component: './list/search/applications',
            access: 'isAdmin',
          },
        ],
      },
      {
        path: '/list',
        redirect: '/list/table-list',
        access: 'isAdmin',
      },
      {
        name: 'table-list',
        icon: 'smile',
        path: '/list/table-list',
        component: './list/table-list',
        access: 'isAdmin',
      },
      {
        name: 'basic-list',
        icon: 'smile',
        path: '/list/basic-list',
        component: './list/basic-list',
        access: 'isAdmin',
      },
      {
        name: 'card-list',
        icon: 'smile',
        path: '/list/card-list',
        component: './list/card-list',
        access: 'isAdmin',
      },
    ],
  },
  {
    path: '/profile',
    name: 'profile',
    icon: 'profile',
    routes: [
      {
        path: '/profile',
        redirect: '/profile/basic',
        access: 'isAdmin',
      },
      {
        name: 'basic',
        icon: 'smile',
        path: '/profile/basic',
        component: './profile/basic',
        access: 'isAdmin',
      },
      {
        name: 'advanced',
        icon: 'smile',
        path: '/profile/advanced',
        component: './profile/advanced',
        access: 'isAdmin',
      },
    ],
  },
  {
    name: 'result',
    icon: 'CheckCircleOutlined',
    path: '/result',
    routes: [
      {
        path: '/result',
        redirect: '/result/success',
        access: 'isAdmin',
      },
      {
        name: 'success',
        icon: 'smile',
        path: '/result/success',
        component: './result/success',
        access: 'isAdmin',
      },
      {
        name: 'fail',
        icon: 'smile',
        path: '/result/fail',
        component: './result/fail',
        access: 'isAdmin',
      },
    ],
  },
  {
    name: 'exception',
    icon: 'warning',
    path: '/exception',
    routes: [
      {
        path: '/exception',
        redirect: '/exception/403',
        access: 'isAdmin',
      },
      {
        name: '403',
        icon: 'smile',
        path: '/exception/403',
        component: './exception/403',
        access: 'isAdmin',
      },
      {
        name: '404',
        icon: 'smile',
        path: '/exception/404',
        component: './exception/404',
        access: 'isAdmin',
      },
      {
        name: '500',
        icon: 'smile',
        path: '/exception/500',
        component: './exception/500',
        access: 'isAdmin',
      },
    ],
  },
  {
    name: 'editor',
    icon: 'highlight',
    path: '/editor',
    routes: [
      {
        path: '/editor',
        redirect: '/editor/flow',
        access: 'isAdmin',
      },
      {
        name: 'flow',
        icon: 'smile',
        path: '/editor/flow',
        component: './editor/flow',
        access: 'isAdmin',
      },
      {
        name: 'mind',
        icon: 'smile',
        path: '/editor/mind',
        component: './editor/mind',
        access: 'isAdmin',
      },
      {
        name: 'koni',
        icon: 'smile',
        path: '/editor/koni',
        component: './editor/koni',
        access: 'isAdmin',
      },
    ],
  },
  {
    path: '/',
    redirect: '/home',
  },
  {
    component: '404',
  },
];
